package phapp.service.barapp.impl;

import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import cn.org.rapid_framework.page.Page;
import cn.org.rapid_framework.page.PageRequest;
import javacommon.base.*;

import phapp.model.barapp.*;
import phapp.dao.barapp.*;
import phapp.service.barapp.impl.*;
import phapp.service.barapp.*;
/**
 * <p> 标题: 酒吧活动表, tc_bar_act_info  业务处理层
 * <p>Description: spring事务实现层,调用Dao层取数据
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @see phapp.model.barapp.BarAct
 * @see phapp.service.barapp.BarActManager
 * @see phapp.dao.barapp.BarActDao
 * @author you name
 * @version 1.0
*/

@Component("barActManager")
@Transactional
public class BarActManagerImpl extends BaseManager<BarAct,java.lang.Integer>
               implements BarActManager {

   /**定义Dao*/
   private BarActDao barActDao;
   /**增加setXXXX()方法,spring就可以通过autowire自动设置对象属性*/
   public void setBarActDao(BarActDao dao) {
      this.barActDao = dao;
   }

   /**获取Dao*/
   public EntityDao getEntityDao() {
      return this.barActDao;
   }

   /**
   * <p>分页查询BarAct<br>
   * @param PageRequest pr
   * @return Page
   * @author
   */
   @Transactional(readOnly=true)
   public Page findByPageRequest(PageRequest pr) {
      return barActDao.findByPageRequest(pr);
   }

   /**
   * <p>批量删除 BarAct<br>
   * @param BarAct u
   * @return Boolean
   * @author
   */
   public Boolean  removeByIdArry(BarAct u) {
      Boolean result =false;
      int i =-1,size=u.getIdList().size();
      i =barActDao.removeByIdArry(u);
      if(i==size){
         result =true;
      }else{
         throw new RuntimeException();
      }
      return result;
   }
	/**
	* <p> Bean查询 <br> 
	* @param BarAct bean
	* @return  BarAct
	* @author
	*/

	/**
	* <p>按Bean查询返回List<br> 
	* @param BarAct bean
	* @return List
	* @author
	*/
	public java.util.List  findListByBean(BarAct u) { 
		java.util.List<BarAct> list =  barActDao.findListByBean(u); 
	      return list;
	}
 	/**
 	 * <p>通过 Map 修改一条 数据<br> 
 	 * @param  java.util.Map 
 	*/
    public int updateByMap(java.util.Map map){
    		int count = barActDao.updateByMap(map);
    		return count;
    }
    


}
